import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App'
import './index.css'
import 'antd/dist/reset.css';

import {Provider} from 'react-redux';
import {persistor, store} from '@/store/index';
import zhCN from 'antd/locale/zh_CN';

import api from '@/api/api'
import {PersistGate} from "redux-persist/integration/react";
import {ConfigProvider} from "antd";

//挂载到react全局变量
window.req = api

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
    <Provider store={store}>
        {/*配置全局使用持久化*/}
        <PersistGate loading={null} persistor={persistor}>
            {/*配置ant全局中文*/}
            <ConfigProvider locale={zhCN}>
                {/*<React.StrictMode>*/}
                <App/>
                {/*</React.StrictMode>,*/}
            </ConfigProvider>

        </PersistGate>

    </Provider>
)
